package refletion;

/**
 * @program: thread
 * @description:
 * @author: gongj
 * @Description: TODO
 * @create: 2020-06-04 22:32
 **/
public class User extends  Person2{

    private String name;
    private int age;

    public static int a = 100;
    public static final int b =200;
    public int id;
    protected int sex;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public User(String name, int age, int id) {
        super();
        this.name = name;
        this.age = age;
        this.id = id;
    }

    public User() {
        super();
    }

    public static int getA() {
        return a;
    }

    public static void setA(int a) {
        User.a = a;
    }

    public static int getB() {
        return b;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", id=" + id +
                ", sex=" + sex +
                '}';
    }
}

class Person2{

    private String personName;
    public String personAddress;
    public static int persona = 100;
    public static final int personb =200;

    public Person2(String personName, String personAddress) {
        this.personName = personName;
        this.personAddress = personAddress;
    }

    public String getPersonName() {
        return personName;
    }

    public void setPersonName(String personName) {
        this.personName = personName;
    }

    public String getPersonAddress() {
        return personAddress;
    }

    public void setPersonAddress(String personAddress) {
        this.personAddress = personAddress;
    }

    public static int getPersona() {
        return persona;
    }

    public static void setPersona(int persona) {
        Person2.persona = persona;
    }

    public static int getPersonb() {
        return personb;
    }

    public Person2() {
    }

    @Override
    public String toString() {
        return "Person2{" +
                "personName='" + personName + '\'' +
                ", personAddress='" + personAddress + '\'' +
                '}';
    }
}
